<form name="vm.userForm" ng-submit="vm.userForm.$valid && vm.save()" novalidate>
    <div class="modal-header clearfix">
        <h4><i class="fa fa-lock"></i> 修改密码</h4>
    </div>
    <div class="modal-body clearfix">

        <div class="form-group" ng-class="{'has-error': (vm.userForm.oldPassword.$touched || vm.userForm.$submitted ) && (vm.userForm.oldPassword.$error.required )}">
            <label for="inputPassword1">原密码: </label>
            <input type="password" ng-model="vm.params.oldPassword" class="form-control" id="inputPassword1" placeholder="原密码" name="oldPassword" required>

            <div class="text-danger" ng-show="(vm.userForm.oldPassword.$touched || vm.userForm.$submitted ) && (vm.userForm.oldPassword.$error.required )">
                请输入原密码
            </div>
        </div>
        <div class="form-group" ng-class="{'has-error': (vm.userForm.newPassword.$touched || vm.userForm.$submitted ) && (vm.userForm.newPassword.$error.required )}">
            <label for="inputPassword2">新密码: </label>
            <input type="password" ng-model="vm.params.newPassword" class="form-control" id="inputPassword2" placeholder="至少8位，且同时包含大写、小写、数字" name="newPassword" required>

            <div class="text-danger" ng-show="(vm.userForm.newPassword.$touched || vm.userForm.$submitted ) && (vm.userForm.newPassword.$error.required )">
                请输入新密码
            </div>
        </div>

    </div>
    <div class="modal-footer">
        <button class="btn btn-primary btn-sm" type="submit">确定</button>
        <button class="btn btn-default btn-sm" type="button" ng-click="vm.cancel()">取消</button>
    </div>
</form>